package src.Packets;

import src.Util.Stream;
import src.Players.Player;
import src.Main;
import src.Skills.*;

public class ItemOnItem {
	public int usedWith, itemUsed;
	
	public ItemOnItem(Player p) {
		if(p == null || p.inStream == null) {
			return;
		}
		int i_1 = p.inStream.readUnsignedWord();
		int i_2 = p.inStream.readUnsignedWordA();
		int i_3 = p.inStream.readUnsignedWord();
		int i_4 = p.inStream.readUnsignedWord();
		usedWith = p.items[i_1] - 1;
		itemUsed = p.items[i_2] - 1;
		System.out.println("item used : "+itemUsed+" used with : "+usedWith);
		switch(itemUsed) {
			case 946:
				Fletching f = new Fletching(p);
				f.fletchLog(usedWith);
				f = null;
			break;
		
			default:
				Main.m.log("[" + p.playerIndex + "-" + p.username + "] packet 53");
			break;
		}
	}
}